﻿package cn.poco.pepsi.service;

import java.util.ArrayList;
import java.util.List;

import android.content.Context;
import cn.poco.pepsi.bean.Area;
import cn.poco.pepsi.bean.Circle;
import cn.poco.pepsi.bean.Dish;
import cn.poco.pepsi.bean.HotSearchKey;
import cn.poco.pepsi.bean.ResDetail;
import cn.poco.pepsi.bean.Restaurant;

public interface ISearch {
	public final static String AREA_PATH = "http://img-m.poco.cn/mypoco/mtmpfile/food_iphone/area.php?cd=#a";

	public final static String BASE_SEARCH_PATH = "http://img-m.poco.cn/mypoco/mtmpfile/MobileAPI/FoodSearch/search.php";

	public final static String DISH_PATH = "http://img-m.poco.cn/mypoco/mtmpfile/food_iphone/dish.php?cd=#a&c=#b";

	public final static String HOT_PATH = "http://img-m.poco.cn/mypoco/mtmpfile/food_iphone/circle.php?cd=#a&rank=#b";

	public final static String RESTAURANT_DEATAIL_PATH = "http://img-m.poco.cn/mypoco/mtmpfile/food_iphone/restaurant.php?resid=#o";

	public final static String SUB_AREA_PATH = "http://img-m.poco.cn/mypoco/mtmpfile/food_iphone/area.php?cd=#a&lid=#b";

	// 热门搜索
	public final static String HOT_KEY_PATH = "http://img-m.poco.cn/mypoco/mtmpfile/MobileAPI/FoodSearch/hot_keyword.php";

	// 百事餐厅
	public final static String PEPSI_RES_PATH = "http://img-m.poco.cn/mypoco/mtmpfile/MobileAPI/FoodSearch/pepsi_res.php";
	// 推荐餐厅
	public final static String POP_RES_PATH = "http://img-m.poco.cn/mypoco/mtmpfile/MobileAPI/FoodSearch/editor_recommend.php";

	// 签到最热
	public final static String ONHERE_HOT_RES_PATH = "http://img-m.poco.cn/mypoco/mtmpfile/MobileAPI/FoodSearch/res_hot_checkin.php?from=#f&to=#t&lid=#a&l=#l";

	public final static String TAG = "SearchImpl";

	public ArrayList<Area> getArea(String citycode, Context context)
			throws Exception;

	/**
	 * @param key
	 *            根据关键字搜索 (必须参数,搜索条件为空传入空串)
	 * @param lid
	 *            根据给定的地区代码搜索该地区所有餐厅信息
	 * @param dish
	 *            根据给定的菜式ID搜索本城市的餐厅信息
	 * @param cd
	 *            城市代码(必须参数)
	 * @param s
	 *            起止位置(必须参数)
	 * @param l
	 *            获取长度(必须参数)
	 * @param dis
	 *            是否筛选有优惠券餐厅(0,1)
	 * @param vouch
	 *            是否筛选加盟餐厅(0,1)
	 * @param locationid
	 *            (商区ID)筛选指定商区餐厅(如果lid存在则搜索地区餐厅，忽略该参数)
	 * @param dishid
	 *            根据指定菜式ID筛选
	 * @return
	 * @throws Exception
	 */
	public List<Restaurant> getFilterRestaurant(String key, String lid,
			String dish, String cd, int s, String l, String dis, String vouch,
			String locationid, String dishid, boolean ispepsi, String msg)
			throws Exception;

	/**
	 * from 起始时间戳 to 结束时间戳 lid 城市地区ID(可选,默认0) l 返回条数
	 * @throws Exception 
	 * **/
	public List<Restaurant> getOnHereHotRes(String from,String to,String lid,String l) throws Exception;

	public List<Circle> getHotCircle(String citycode, Integer num)
			throws Exception;

	public ResDetail getResDetail(String resid) throws Exception;

	public ArrayList<Area> getSubArea(String citycode, String lid)
			throws Exception;

	public List<Dish> getDishs(String citycode, String type, Context context)
			throws Exception;

	// 获取热门搜索词
	public ArrayList<HotSearchKey> getHotkey() throws Exception;

}
